let c = {};
const controls = require.context('./leftpanel_controlinstance', true, /\.js$/);
for (let key of controls.keys()) {
  const filename = key.split('/').pop().replace(/\.\w+$/, '');
  c[filename] = controls(key).default;
}

export const xcform_groups = [{
    title: '输入型组件',
    list: [
      c.xcform_controlinstance_input_string,
      c.xcform_controlinstance_input_text,
      c.xcform_controlinstance_input_number,
      c.xcform_controlinstance_input_date,
      c.xcform_controlinstance_input_datetime,
      c.xcform_controlinstance_input_upload,
      c.xcform_controlinstance_value_autono,
      c.xcform_controlinstance_input_score,
    ]
  },
  {
    title: '选择型组件',
    list: [
      c.xcform_controlinstance_select,
      c.xcform_controlinstance_selectmulti,
      c.xcform_controlinstance_objselect,
      c.xcform_controlinstance_objselectmulti,
      c.xcform_controlinstance_input_subtable,
    ]
  },
  {
    title: '业务型组件',
    list: [
      c.xcform_controlinstance_objselect_admin,
      c.xcform_controlinstance_objselectmulti_admin,
      c.xcform_controlinstance_objselect_role,
      c.xcform_controlinstance_objselectmulti_role,
    ]
  },
  {
    title: '布局组件',
    list: [
      c.xcform_controlinstance_sepline,
      c.xcform_controlinstance_sepbreak,
    ]
  },
];
